package cn.stylefeng.guns.modular.business.frequency.orderlogistics.mapper;

import cn.stylefeng.guns.modular.business.frequency.orderlogistics.model.result.TransportPageVO;
import cn.stylefeng.guns.modular.business.frequency.transport.model.param.TransportDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.stylefeng.guns.modular.business.frequency.orderlogistics.entity.OrderLogistics;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 运单物流信息 Mapper 接口
 *
 * @author yujie
 * @date 2023/05/09 17:16
 */
public interface OrderLogisticsMapper extends BaseMapper<OrderLogistics> {

    /** 在途列表 */
    Page<TransportPageVO> getWaitLogisticsList(@Param("page") Page<Object> page, @Param("orderDTO") TransportDTO orderDTO);

    /** 获取在途物流信息 */
    List<OrderLogistics> getLogisticsListByTransportId(@Param("transportId") Long transportId);

    /** 根据运单id查询 最新的运单的 到达地点等信息 */
    OrderLogistics getLastLogistics(@Param("transportId") String transportId);

    /** 根据订单id 获取在途物流信息 */
    List<OrderLogistics> getAppLogisticsByOrderId(@Param("orderId") String orderId);

}